package week_05;

public class FindPeakElement_162 {

    public int findPeakElement(int[] nums) {
        int l = 0;
        int r = nums.length - 1;
        while (l < r) {
            int lmid = (r + l) / 2;
            int rmid = lmid + 1;
            if (nums[lmid]< nums[rmid]) {
                l = lmid+1;
            } else {
                r = rmid-1;
            }
            System.out.println("l:" + l + ":r" + r);
        }
        return l;
 //终止条件 域 0～n-1
    }
}
